import request from '@/utils/request'

// 查询质检单头列表
export function listHeader(query) {
  return request({
    url: '/api/qualityTaskHeader/page',
    method: 'get',
    params: query
  })
}

// 查询质检单头详细
export function getHeader(qualityNo) {
  return request({
    url: '/api/qualityTaskHeader/' + qualityNo,
    method: 'get'
  })
}

// 新增质检单头
export function addHeader(data) {
  return request({
    url: '/api/qualityTaskHeader/add',
    method: 'post',
    data: data
  })
}

// 修改质检单头
export function updateHeader(data) {
  return request({
    url: '/api/qualityTaskHeader/update',
    method: 'post',
    data: data
  })
}

// 删除质检单头
export function delHeader(qualityNo) {
  return request({
    url: '/api/qualityTaskHeader/delete/' + qualityNo,
    method: 'post'
  })
}

export function qualityAPI(data) {
  return request({
    url: '/api/quality/task/start',
    method: 'post',
    data
  })
}

export function cancelAPI(data) {
  return request({
    url: '/api/quality/task/del',
    method: 'post',
    data
  })
}

